<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * @category   Hamania
 * @package    Hamania_CashOnDelivery
 * @copyright  Copyright (c) 2010 Hamania Medien GmbH & Co. KG (http://www.phoenix-medien.de)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
?>
<?php
$_code		= $this->getMethodCode();
$_extra_fee	= $this->getMethod()->getAddressCosts($this->getShippingAddress());

$_extra_fee_excl = $this->convertPrice(Mage::helper('cashondelivery')->getCodPrice($_extra_fee, $this->helper('cashondelivery')->displayCodFeeIncludingTax(), $this->getShippingAddress()), true);
$_extra_fee_incl = $this->convertPrice(Mage::helper('cashondelivery')->getCodPrice($_extra_fee, true, $this->getShippingAddress()), true);

$_codFeeStr = $_extra_fee_excl;
if ($this->helper('cashondelivery')->displayCodBothPrices() && ($_extra_fee_incl != $_extra_fee_excl)) {
	$_codFeeStr .= ' ('.$this->__('Incl. Tax').' '.$_extra_fee_incl.')';
}
?>
<?php if($this->getMethod()->getCustomText() || $_extra_fee || Mage::getStoreConfig('payment/cashondelivery/display_zero_fee')): ?>
<fieldset class="form-list">
	<ul id="payment_form_<?php echo $_code ?>" style="display:none;">
        <?php if($_extra_fee || Mage::getStoreConfig('payment/cashondelivery/display_zero_fee')): ?>
		<li><?php echo $this->__('You will be charged an extra fee of %s.', $_codFeeStr) ?></li>
        <?php endif; ?>
		<?php if ($this->getMethod()->getCustomText()): ?>
		<li>
			<?php echo $this->getMethod()->getCustomText() ?>
		</li>
		<?php endif; ?>
	</ul>
</fieldset>
<?php endif; ?>